NXT_PlayTone
Plays a tone with the given frequency and duration
Contents
Syntax
NXT_PlayTone(frequency, duration)
NXT_PlayTone(frequency, duration, handle)
Description
NXT_PlayTone(frequency, duration) plays a tone of the frequency in Hz (200 - 14000Hz) and the duration in milli seconds.
NXT_PlayTone(frequency, duration, handle) sends the play tone command over the specific NXT handle (e.g. struct containing a serial handle (PC) / file handle (Linux)).
If no NXT handle is specified the default one (COM_GetDefaultNXT) is used.
For more details see the official LEGO Mindstorms communication protocol.
Examples
NXT_PlayTone(440, 100);
handle = COM_OpenNXT('bluetooth.ini','check'); COM_SetDefaultNXT(handle); NXT_PlayTone(1200, 120);
See also
Signature
- Author: Linus Atorf (see AUTHORS)
- Date: 2007/10/15
- Copyright: 2007-2008, RWTH Aachen University